import { createRouter, createWebHashHistory } from 'vue-router'

import HomeView from '@/view/home/index.vue'
import MonitorView from '@/view/monitor/index.vue'
import AlarmView from '@/view/alarm/index.vue'
import EquipmentView from '@/view/equipment/index.vue'
import GreenhouseView from '@/view/greenhouse/index.vue'

const routes = [
  { path: '/', redirect: '/home' },
  { path: '/home', component: HomeView },
  { path: '/monitor', component: MonitorView },
  { path: '/alarm', component: AlarmView },
  { path: '/equipment', component: EquipmentView },
  { path: '/greenhouse', component: GreenhouseView }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
